![](/file/19402/ADC Tools Sampler CD Disk 3 1999.iso/Documentation/CodeWarrior/HTML/IDE_User_Guide/images/tbar.gif)
This manual describes the CodeWarrior Integrated Development Environment (IDE) in detail. You can apply the adept capabilities of the IDE to develop software on different operating systems using programming languages like C, C++, and Pascal.
NOTE
On occasion a CodeWarrior product ships with an earlier version of the IDE than reflected in this user guide. In that case, your IDE will not have the new features described in this manual. You can identify new features by referring to "New in This Release" on page 24. For more information on available patches and updates for CodeWarrior tools, visit the following web address:
http://www.metrowerks.com/
This chapter introduces the CodeWarrior IDE. The sections in this chapter are:
The CodeWarrior IDE is an application that provides a simple, versatile graphical user interface and tools for developing computer software. Using the IDE, you can develop a program, plug-in, library, or other executable code to run on a wide variety of computer systems using different programming languages.
The IDE permits a software developer to quickly assemble source code files (for example, a file written in the C++ computer language), resource files, library files, other files, and configuration settings into a "project," without writing a complicated build script (or "makefile"). Source code files may be added or deleted from a project using simple mouse and keyboard operations instead of tediously editing a build script.
A single project allows you to create and manage several configurations of settings for use on various computer platforms. The platform on which you run CodeWarrior is called the "host." From that host, you use the IDE to develop code to "target" various platforms and operating systems. There are two distinct meanings of "target" in CodeWarrior terminology:
CodeWarrior allows you to specify multiple build targets for a particular platform target. For example, you can compile a debugging version (build target) and an optimized version (build target) of your program for Windows (platform target). The build targets can share files in the same project while using their own settings. After debugging the program, generating a final version is as simple as changing the project's build target and using a single Make command.
The CodeWarrior IDE includes compilers, linkers, a debugger, a source code browser, an editor, and rapid application development tools. You can edit, navigate, examine, compile, link, and debug code until you have a running application. Options for code generation, debugging, and navigation of your project are all configurable in the IDE.
The CodeWarrior IDE and its tools have everything you need to develop code!
There are several chapters in this User Guide to explain how to use the IDE. Each chapter begins with an overview of topics. The chapters are:
-
Introduction-(this chapter) an overview of the CodeWarrior IDE and documentation
-
Getting Started-system requirements and installation
-
Working with Projects-creating, configuring, and managing projects
-
Working with Files-opening, saving, backing up, comparing, and printing files
-
Editing Source Code-editing and navigating text and source code
-
Searching and Replacing Text-finding and replacing text in single files and multiple files
-
Browsing Source Code-analyzing and navigating a project from various views
-
Configuring IDE Options-customizing the IDE Preferences window and using toolbars
-
Configuring Target Options-setting up and customizing a project and its build targets
-
Compiling and Linking-compiling, linking, running, updating, preprocessing, and precompiling a project's build target and its files
-
Debugging Source Code-using the CodeWarrior debugger to examine your code
-
RAD Designs and Layouts-understanding rapid application development (RAD) and its implementation in CodeWarrior
-
RAD Layout Editing-using CodeWarrior's RAD tools to create and manage project designs and layouts
-
RAD Components-a description of the components provided with the RAD tools
-
RAD Browsing-using the Class Browser and Object Inspector to examine RAD designs
-
Using CodeWarrior IDE with Version Control Systems-using revision control systems with the CodeWarrior IDE
-
CodeWarrior Reference-convenient reference information for menu commands and default key bindings
Please read the release notes. They contain important information about new features, bug fixes, and incompatibilities that may not have made it into the documentation due to release deadlines. You can find the release notes on the CodeWarrior CDs in the Release Notes folder.
The following sections describe the different conventions used in the CodeWarrior IDE manual:
The IDE manual uses some style conventions to make it easier to read and find specific information:
Notes, warnings, tips, and beginner's hints
An advisory statement or NOTE may restate an important fact, or call your attention to a fact which may not be obvious.
A WARNING given in the text may call attention to something such as an operation that, if performed, could be irreversible, or flag a possible error that may occur.
A TIP can help you become more productive with the CodeWarrior IDE. Impress your friends with your knowledge of little-known facts that can only be learned by actually reading the fabulous manual!
A For Beginners note may help you better understand the terminology or concepts if you are new to programming.
Typeface conventions
If you see some text that appears in a different
typeface (as the word different
does in this sentence), you are reading file or folder names, source code, keyboard input, or programming items.
Text formatted like this
means that the text refers to an item on the screen, such as a menu command
or control
in a dialog box.
When a menu command is part of a submenu in CodeWarrior's menu hierarchy, all of the intermediate commands are listed and separated with a > character. For example, the Reset Window Toolbar menu command is part of the Toolbar submenu, which is in the Window menu. When you read Window > Toolbar > Reset Window Toolbar
, follow the hierarchy to select the command. In this case, you would highlight Window in CodeWarrior's menu bar, then highlight Toolbar, and finally choose the Reset Window Toolbar command.
If you are using an online viewing application that supports hypertext navigation, such as Adobe Acrobat, you can click on underlined and colored text to view another topic or related information. For example, clicking the text "IDE User Guide Overview" in Adobe Acrobat takes you to a section that gives you an overview of the entire IDE User Guide.
CodeWarrior runs on the host platforms and operating systems listed below. Throughout this manual, a generic platform identifier is used to identify the host platform, regardless of operating system.
The specific versions of the operating systems that host CodeWarrior are:
The visual interfaces of the platforms that host CodeWarrior are nearly identical in all significant respects. When discussing a particular interface element, such as a dialog box or window, the screenshot of that element can come from a variety of possible hosts. You should have no difficulty understanding the picture, even if you are using CodeWarrior on a different host than the one shown in the screenshot.
However, there are occasions when dialog boxes or windows are unique to a particular host. For example, a particular dialog box may appear dramatically different on a Windows host and on a Mac OS host. In that case, a screenshot from each unique host will be clearly identified so that you can see how CodeWarrior works on your preferred host.
Most of CodeWarrior's default keyboard shortcuts are very similar across multiple platforms. However, some keys have different names, depending on the host. For example, a typical keyboard for a Windows machine has an Alt key, but that same key is called the Option key on a typical keyboard for a Mac OS computer.
To handle these kinds of situations, CodeWarrior documentation identifies and uses the following paired terms in the text:
For example, you may encounter instructions such as "Press Enter/Return to proceed," or "Alt/Option click the Function pop-up menu to see the functions in alphabetical order." The first instruction tells you to press Enter on a Windows host or Return on a Mac OS host in order to proceed. The same idea applies to the second instruction: Alt-click on a Windows host or Option-click on a Mac OS host. In general, use the appropriate key as it is labeled on your keyboard.
Some combinations of key strokes require multiple modifier keys. In those cases, key combinations are shown connected with hyphens. For example, if you read "Shift-Alt/Option-Enter/Return," you would press the Shift, Alt, and Enter keys on a Windows host and the Shift, Option, and Return keys on a Mac OS host.
Sometimes the cross-platform variation in keyboard shortcuts is more complex. In those cases, you will see more detailed instructions on how to use a keyboard shortcut for your host platform. In all cases, the host and shortcut will be clearly identified.
Special note for Solaris users
The Solaris-hosted CodeWarrior IDE uses the same modifier key names as used for the Mac OS (Shift, Command, Option, and Control). Likewise, the Key Bindings preference panel uses Mac OS symbols to represent modifier keys. Table 17.1 on page 642 shows the default modifier key mappings and the symbols used to represent them. On Solaris machines, modifier keys can be mapped to any key on the keyboard. See "Keyboard Preferences Dialog Box" on page 667 for more information on changing the default modifier key mappings. When reading this manual, you will need to keep in mind your modifier key mappings.
The Products provided by Metrowerks under the License agreement process dates only to the extent that the Products use date data provided by the host or target operating system for date representations used in internal processes, such as file modifications. Any Year 2000 Compliance issues resulting from the operation of the Products are therefore necessarily subject to the Year 2000 Compliance of the relevant host or target operating system. Metrowerks directs you to the relevant statements of Microsoft Corporation, Sun Microsystems, Inc., Apple Computer, Inc., and other host or target operating systems relating to the Year 2000 Compliance of their operating systems. Except as expressly described above, the Products, in themselves, do not process date data and therefore do not implicate Year 2000 Compliance issues.
For additional information, visit:
http://www.metrowerks.com/about/y2k.html
The CodeWarrior IDE is now at version 4.0. Among its new features, the following are the most notable:
This release of CodeWarrior introduces rapid application development (RAD) tools for Java. You can use these RAD tools to quickly create Java applets, applications, and frameworks. The new tools include a layout editor, RAD components, a catalog window, and an object inspector. CodeWarrior wizards guide you through the process of creating RAD "designs." A new Design tab in the project window allows you to manage various designs for a given project.
For more information, see these chapters: "RAD Designs and Layouts" on page 493, "RAD Layout Editing" on page 519, "RAD Components" on page 549, and "RAD Browsing" on page 559.
The File menu contains an updated New
command. Using this command, you can create files, projects, RAD designs, and objects. The New
command also lets you access CodeWarrior's Makefile Importer and RAD wizards.
For more information, refer to "Creating a New Project" on page 52, "Importing Makefiles into Projects (Windows)" on page 64, "Creating a New File" on page 107, and "Creating RAD Projects" on page 495.
CodeWarrior can be customized to suit your personal programming needs. You can create and modify menu commands, toolbar buttons, key bindings, and contextual menus. The IDE lets you associate these new items with a command line (Windows) or a script (Mac OS). The customized menu commands have access to IDE information, such as the current editor selection, the frontmost window, the current project, and the output file of the current project.
Refer to "Customizing the IDE" on page 289 for more information.
New keypad key bindings compliment the existing keyboard key bindings. Imported and exported key binding files are now cross-platform. The user interface for modifying key bindings has been improved.
For more information, refer to "Customizing Key Bindings" on page 297.
CodeWarrior's project manager now lets you import and export a description of your project in extensible markup language (XML).
To learn more, see "Importing and Exporting a Project" on page 102.
The debugger features a new Auto-variables view. This view automatically displays the variables referenced from a particular line of source code.
For more information, read "Auto-Variables View" on page 409.
In addition to the current {Project}
, {Compiler}
, and {System}
access path definitions, you can now define your own source trees. Your source trees can be specified at the global- or target-level of the project. They can be defined via an absolute path, environment variable (Windows and Solaris), or a registry key (Windows). The source trees can then be used to form access paths.
To learn how to create your own source trees and corresponding access paths, see "Source Trees" on page 261.
In the improved project window, you can sort file lists according to any of the columns displayed in that list.
For more information, see "Sorting items" on page 47.
If you are trying to get started quickly with a new platform or if you are new to CodeWarrior, see "QuickStart and Tutorials" on page 27.
If you are an experienced CodeWarrior IDE user, review "New in This Release" on page 24 for an overview of new features.
To get started quickly with a new target operating system, see "Targeting Documentation" on page 27.
When you are ready to debug your code, be sure to read "Debugging Source Code" on page 389.
The following sections will give you a better idea of how to proceed:
You will find all the manuals mentioned in this section in the CodeWarrior Documentation
folder on the CodeWarrior CD. For some products, the manuals will be on the CodeWarrior Reference CD.
If you are new to the CodeWarrior IDE, check out the following resources:
This manual describes how to use the cross-platform features of the IDE. However, you should read the appropriate CodeWarrior targeting documentation to learn how to develop software for a specific platform target.
Table 1.1 identifies the documentation that you should consult when developing software for specific platform targets.
NOTE
The CodeWarrior product you are using may not generate software for all the platform targets listed in Table 1.1.
Table 1.1 Targeting Manuals for various platform targets
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: support@metrowerks.com
Copyright © 1999, Metrowerks Corp. All rights reserved.
Last updated: May 24, 1999
* Chris Magnuson
* John Roseborough